package com.yj.suncity.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

public class ProvinceListBean {

	private String success;// ": "1",
	private String msg;// ": "获取所有省份成功",
	private JSONObject data;// ": {
	private List<ProvinceBean> ds;//": [

	public ProvinceListBean(JSONObject json) {
		this.success = json.optString("success");
		this.msg = json.optString("msg");
		this.data = json.optJSONObject("data");
		
		ds = new ArrayList<ProvinceBean>();
		if (data!=null) {
			JSONArray array=data.optJSONArray("ds");
			if (array!=null) {
				for (int i = 0; i < array.length(); i++) {
					JSONObject item = array.optJSONObject(i);
					if (item!=null) {
						this.ds.add(new ProvinceBean(item));
					}
				}
			}
		}
	}

	public String getSuccess() {
		return success;
	}

	public String getMsg() {
		return msg;
	}

	public JSONObject getData() {
		return data;
	}

	public List<ProvinceBean> getDs() {
		return ds;
	}

	
}
